<?php
include 'global.php';
include 'camnangList.php';
include 'sub/header.php';
?>
<script type="text/javascript">
    $(window).load(function() {
        $('#typelist').change(function(){
            var cid = $(this).val();
            var nt = $('#nationlist').val();
            var url = "camnangList?cid=" + cid + "&nt=" + nt;
            $(location).attr('href',url);
        });
        $('#nationlist').change(function(){
            var nt = $(this).val();
            var cid = $('#typelist').val();
            var url = "camnangList?cid=" + cid + "&nt=" + nt;
            $(location).attr('href',url);
        });
    });
</script>
<div class="content-outer">
    <div class="content-inner">
        <div class="title_border">
            <h1>Danh sách bài viết</h1>
            <div style="margin-top: 15px" class="rightbt">
                <ul>
                    <li><a href="camnangAd"><span><span>Thêm bài viết</span></span></a></li>
                </ul>
            </div>
        </div>
        <div class="before-after-table">
            <select style="float: right; margin-left: 5px; width: 150px; outline: none; border: 1px solid #CCC; color: #999" id="nationlist">
                <option value="0">Tất cả</option>
                <?php echo $nationlist ?>
            </select>
            <strong class="apply-action" style="padding-left: 10px">Quốc gia:</strong>
            <select style="float: right; margin-left: 5px; width: 150px; outline: none; border: 1px solid #CCC; color: #999" id="typelist">
                <option value="0">Tất cả</option>
                <?php echo $typelist ?>
            </select>
            <strong class="apply-action">Chuyên đề:</strong>
        </div>
        <table width="100%" cellspacing="0" cellpadding="0" class="das">
            <tbody>
                <tr>
                    <th class="check"></th>
                    <th class="photo">Hình ảnh</th>
                    <th class="item_name"><a href="#" >Tiêu đề</a></th>
                    <th class="quickaction"><a href="#">Chuyên đề</a></th>
                    <th class="quickaction"><a href="#">Quốc gia</a></th>
                    <th class="status"><a href="#">Ngày gửi</a></th>
                    <th class="tool">Công cụ</th>
                </tr>
                <?php echo $camnangresult ?>
            </tbody>
        </table>
    </div>
</div>
<div class="pagination">
    <?php echo $camnangpaging ?>
</div>
<?php
                include 'sub/footer.php';
?>